<html>
<head>
<title>Diary Testing | Home</title>
</head>

<?php 
include ('./nav.html');
?>

<h3>This is for testing the Diary Blog db</h3>

<?php
    $db = new SQLiteDatabase("testDB.db");
    $db->query("DROP TABLE blog");
    $db->query("CREATE TABLE blog (BID int, blogdate char(11), Title char(55))");
    $db->query("INSERT INTO blog values (000, '2009-11-09', 'My First Blog')");
    echo "Test select * from blog:<br>";
    $query = $db->query("SELECT * FROM blog");
    while($entry = $query->fetch(SQLITE_ASSOC)) {
        echo "result: " . $entry['BID'] . ", " .$entry['blogdate']. ", ".$entry['Title']."<br>";
    }
    
?>

</html>